import qiniu from 'qiniu'
var accessKey = 'Tg9vbJMCK7eQ0eye7vEHcDG49bveyvWejJKoMVAq';
var secretKey = 'sIqu-4SKloJujVhUlWXZpdzu56Dk3RuER6DiWf4T';
var mac = new qiniu.auth.digest.Mac(accessKey, secretKey);

//自定义凭证有效期（示例2小时，expires单位为秒，为上传凭证的有效时间）
var options = {
  scope: 'qmtoken',
  expires: 7200
};
var putPolicy = new qiniu.rs.PutPolicy(options);
var uploadToken=putPolicy.uploadToken(mac);
